package dao

import (
	"context"
	"gorm.io/gorm"
)

type ArticleReaderDao interface {
	//insert or update
	Upsert(ctx context.Context, art Article) error
	UpsertV2(ctx context.Context, art PublishedArticle) error //换一张表
}

type ArticleORMReaderDAO struct {
	db *gorm.DB
}

func (a *ArticleORMReaderDAO) Upsert(ctx context.Context, art Article) error {
	//TODO implement me
	panic("implement me")
}
func (a *ArticleORMReaderDAO) UpsertV2(ctx context.Context, art PublishedArticle) error {
	//TODO implement me
	panic("implement me")
}
func NewArticleORMReaderDAO(db *gorm.DB) ArticleReaderDao {
	return &ArticleORMReaderDAO{
		db: db,
	}
}
